﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;

namespace GPBenhLanh
{
    public partial class rptBCThuLao_XN_CT : DevExpress.XtraReports.UI.XtraReport
    {
        public rptBCThuLao_XN_CT()
        {
            InitializeComponent();
        }

        private void xrTableCell19_TextChanged(object sender, EventArgs e)
        {
            XRTableCell ctr = (XRTableCell)sender;
            DateTime o;
            if (DateTime.TryParse(ctr.Text, out o) && ctr.Text.Length > 10)
                ctr.Text = Convert.ToDateTime(ctr.Text).ToString("dd/MM/yy");
            else
                return;
        }

        private void xrTableCell21_TextChanged(object sender, EventArgs e)
        {
            XRTableCell ctr = (XRTableCell)sender;
            int o;
            if (int.TryParse(ctr.Text, out o))
                ctr.Text = Convert.ToInt32(ctr.Text).ToString("#,#");
            else
                return;
        }

        private void xrTableCell20_TextChanged(object sender, EventArgs e)
        {
            XRTableCell ctr = (XRTableCell)sender;
            int o;
            if (int.TryParse(ctr.Text, out o))
                ctr.Text = Convert.ToInt32(ctr.Text).ToString("#,#");
            else
                return;
        }

        private void xrTableCell38_TextChanged(object sender, EventArgs e)
        {
            XRTableCell ctr = (XRTableCell)sender;
            DateTime o;
            if (DateTime.TryParse(ctr.Text, out o) && ctr.Text.Length > 10)
                ctr.Text = Convert.ToDateTime(ctr.Text).ToString("dd/MM/yy");
            else
                return;
        }

        private void xrTableCell40_TextChanged(object sender, EventArgs e)
        {
            XRTableCell ctr = (XRTableCell)sender;
            DateTime o;
            if (DateTime.TryParse(ctr.Text, out o) && ctr.Text.Length > 10)
                ctr.Text = Convert.ToDateTime(ctr.Text).ToString("dd/MM/yy");
            else
                return;
        }

        private void xrTableCell11_TextChanged(object sender, EventArgs e)
        {
            XRTableCell ctr = (XRTableCell)sender;
            DateTime o;
            if (DateTime.TryParse(ctr.Text, out o) && ctr.Text.Length > 10)
                ctr.Text = Convert.ToDateTime(ctr.Text).ToString("dd/MM/yy");
            else
                return;
        }

        private void xrTableCell13_TextChanged(object sender, EventArgs e)
        {
            XRTableCell ctr = (XRTableCell)sender;
            DateTime o;
            if (DateTime.TryParse(ctr.Text, out o) && ctr.Text.Length > 10)
                ctr.Text = Convert.ToDateTime(ctr.Text).ToString("dd/MM/yy");
            else
                return;
        }

    }
}
